package com.cy.pj.common.aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Service;

import lombok.extern.slf4j.Slf4j;

@Service
@Aspect
@Slf4j
public class UserLogAspect {

    @Pointcut("bean(userServiceImpl)")
    public void doUser() {
    }

    @Before("doUser()")
    public void doBefore(JoinPoint jp) {
        log.info("doUserBefore");
    }

    @After("doUser()")
    public void doAfter() {
        log.info("doUserAfter");
    }
}
